home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / ada / gwuada_6.zip / ADA.C next >
C/C++ Source or Header  |  1993-09-11  |  4KB  |  96 lines

  1. /* ada.c */
  2.  
  3. /*
  4.     GWAda Development Environment for 386/486 PCs   
  5.     Copyright (C) 1993, Arthur Vargas Lopes  & Michael Bliss Feldman
  6.                         vlopes@vortex.ufrgs.br mfeldman@seas.gwu.edu
  7.  
  8.     This program is free software; you can redistribute it and/or modify
  9.     it under the terms of the GNU General Public License as published by
  10.     the Free Software Foundation; version 2 of the License.    
  11.  
  12.  
  13.     This program is distributed in the hope that it will be useful,
  14.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.     GNU General Public License for more details.
  17.  
  18.     You should have received a copy of the GNU General Public License
  19.     along with this program; if not, write to the Free Software
  20.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21. */
  22. #include "externs.h"
  23.  
  24. void AVL_CENTER(int line, char *msg)
  25. {
  26.         int i;
  27.         i = (80 - strlen(msg)) / 2;                
  28.         _settextposition(line,i);
  29.         _outtext(msg);
  30. }
  31.  
  32.  
  33. void main(int nn, char *aa[])
  34. {
  35.         AVL_WIN_PTR m;
  36.         AVL_LINE_PTR head = NULL, temp;
  37.         AVL_MOUSE mouse;
  38.         char line[100];
  39.         int x ;
  40.         int no = 0;
  41.         int ch;
  42.  
  43.         AVL_EDIT_WINDOW_PTR w;
  44.         AVL_INSTALL_I23();
  45. /*              system("mouse");
  46. */
  47.         sprintf(avl_version_mark,"Version %s 93",GWAda_Version);
  48.         w = &avl_windows[avl_window];
  49.         AVL_READ_OPTIONS();
  50.         AVL_GET_CDIR();
  51.         _settextrows( 25 );
  52.         _clearscreen( _GCLEARSCREEN );
  53.         m = AVL_MAKE_WINDOW("",1,1,24,80,avl_txt_bk_color,avl_txt_color);
  54.         _settextcursor(0x2000);  /*  turn cursor off */
  55.         sprintf(line,"GWAda Development Environment  -  Version %s  (C) 1992, 1993",GWAda_Version);
  56.         AVL_CENTER( 3,line);
  57.         AVL_CENTER( 5,"  Michael B. Feldman, Ph.D.      Arthur V. Lopes, Ph.D.   ");
  58.         AVL_CENTER( 6,"    mfeldman@seas.gwu.edu          lopes@seas.gwu.edu     ");
  59.         AVL_CENTER( 8,"              Charles Kann, Ph.D. Candidate               ");
  60.         AVL_CENTER( 9,"                   ckann@seas.gwu.edu                     ");
  61.         AVL_CENTER(12," Department of Electrical Engineering and Computer Science");
  62.         AVL_CENTER(13,"        School of Engineering and Applied Science         ");
  63.         AVL_CENTER(14,"             The George Washington University             ");
  64.         AVL_CENTER(15,"                  Washington, D.C. 20052                  ");
  65.         AVL_CENTER(16,"                         U. S. A.                         ");
  66.         AVL_CENTER(18,"A Project Co-Sponsored by ARPA (Contract# FY3592-93-10234)");
  67.         AVL_CENTER(19,"Encapsulating the NYU Ada 83 Translator");
  68.         AVL_CENTER(20,"Freely distributable without cost or obligation");
  69.         AVL_CENTER(22,"Press any key to start ...");
  70.         _settextcursor(0x2000);  /*  turn cursor off */
  71.         AVL_MOUSE_INIT();
  72.         AVL_MOUSE_ON();
  73.         while (!kbhit())  {
  74.                 mouse = AVL_MOUSE_STATUS();
  75.                 if (mouse.status == 1) break;
  76.                 }
  77.         if (mouse.status != 1)  {
  78.                 x = getch(); 
  79.                 if (x == 0) x = getch();
  80.                 }
  81.         AVL_DEL_WINDOW(m);
  82.         if (nn == 1)    {
  83.                 AVL_LOAD_FILE("NONAME.Ada");
  84.                 strcpy(current_file_name,"NONAME.Ada");
  85.                 }
  86.         else  {
  87.                 AVL_LOAD_FILE(*(aa+1));
  88.                 strcpy(current_file_name,*(aa+1));
  89.                 }
  90.         avl_nwindows += 1;
  91.         AVL_MOUSE_OFF();
  92.         AVL_EDIT('i');
  93.         AVL_RESTORE_I23();
  94.         AVL_MOUSE_OFF();
  95. }
  96.